<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ImageReview._Default" MaintainScrollPositionOnPostback="true"%>
<%@ Register Src="PreviewTable.ascx" TagPrefix="PR" TagName="PreviewTable" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Turners Photo Decoding Service - Image Review</title>
    <link type="text/css" rel="Stylesheet" href="Master.css" />
    <link type="text/css" rel="Stylesheet" href="PreviewStyles.css" />
    <script language="javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript">
    
    function validate(consignmentnumberid, goodsid) 
    {
        var consigntextbox  = document.getElementById(consignmentnumberid);
        var goodstextbox  = document.getElementById(goodsid);
        
        consigntextbox.value = consigntextbox.value.replace(/^\s*/, "").replace(/\s*$/, "");
        goodstextbox.value = goodstextbox.value.replace(/^\s*/, "").replace(/\s*$/, "");
        
        if (consigntextbox.value.length == 0 && goodstextbox.value.length == 0) {
           alert('Please enter a Consignment Number or a Goods ID');
           return false;
       }
       if (goodstextbox.value.length > 0) {
           var validGoodId = jQuery.isNumeric(goodstextbox.value);
           if (!validGoodId) {
               alert("The Good ID must be interger.");
               return false;
           }
           if(goodstextbox.value.length > 8) {
               alert("The Good ID must be less than 9 digits.");
               return false;
           }
       }
        return true;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" class="headingTable" style="margin-top: -19px !important;" cellpadding="0" cellspacing="0">
        <tr>
            <td style="width:50%; height:58px; text-align:left; vertical-align:top; background-image:url('logo.gif'); background-repeat:no-repeat; background-position: left bottom;">&nbsp;</td>
            <td style="width:50%; text-align:right; vertical-align:middle;" class="pageheading">Match Images to Good IDs</td>
        </tr>
        <tr>
        <td colspan="2" style="width:100%; height:20px" class="separator" align="right">
        <a href="Search.aspx" class="customLink1">Search</a> | <a href="Submit.aspx" class="customLink1">Select & Process</a> | <span class="linklabel">Match Good ID </span>| <a href="Process.aspx" class="customLink1">Review Images</a>| <a href="Accept.aspx" class="customLink1">Waiting</a> | <a href="BatchProcess.aspx" class="customLink1">Batch Process</a> &nbsp;
        </td>
        </tr>        
        </table>
        <br />
        <div class="leftspacing">
            <asp:Label ID="lblUsername" runat="server" Text="Could not find current user." CssClass="desclabel"></asp:Label>
            <asp:Label ID="lblUsername2" runat="server" Text=""></asp:Label>
            <!--<asp:Label ID="Label1" runat="server" Text="Image Folder: " CssClass="desclabel"></asp:Label>-->
            <asp:Label ID="FolderName" runat="server" Visible="False" Text=" " CssClass=""></asp:Label>
            <div style="font-weight: bold;">
                <ol>
                    <li>Check that the correct images are designated as barcodes</li>
                    <li>Enter the correct Good ID or Consignment Number if necessary</li>
                    <li>Click on Accept Images to process that row (Rows that are not accepted or deleted will remain on this page)</li>
                    <li>Click Next at the bottom of the page when ready to proceed</li>
                </ol>
            </div>
        </div>
        <div style="padding: 20px 50px; line-height: 24px;">
            <asp:Literal ID="literalMessage" runat="server"></asp:Literal>
        </div>
        <div>
            <PR:PreviewTable id="previewtable1" runat="server" />
        </div>
    </form>
</body>
</html>
